package com.one.common.common.user.modle;

import com.one.common.model.bean.CityBean;
import com.one.common.model.bean.UserInfoBean;
import com.one.common.model.http.base.BaseResponse;

import java.util.ArrayList;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * author ：zhulunjun
 * email  ：zhulunjun@qq.com
 * date   ：2018/8/5 下午5:35
 * description ：用户信息
 **/
public interface UserInfoApi {
    /**
     * 获取用户信息
     */
    @FormUrlEncoded
    @POST("/memberInterfaces/v1.0/getMemberDetail")
    Observable<BaseResponse<UserInfoBean>> getUserInfo(@FieldMap Map<String, String> params);


    /**
     * 更新用户信息
     */
    @FormUrlEncoded
    @POST("/memberInterfaces/v1.0/updateMemberDetail")
    Observable<BaseResponse<String>> updateUserInfo(@FieldMap Map<String, String> params);

    /**
     * 更新师傅独有信息
     */
    @FormUrlEncoded
    @POST("/yinlongMemberInterfaces/v1.0/updateMemberWorker")
    Observable<BaseResponse<String>> updateWorkerUserInfo(@FieldMap Map<String, String> params);

    /**
     * 上传图片
     */
    @POST("/settingInterfaces/v1.0/uploadImg")
    Observable<BaseResponse<String>> uploadImg(@Body RequestBody body);

    /**
     * 获取城市
     */
    @FormUrlEncoded
    @POST("/addressInterfaces/v1.0/getCitys")
    Observable<BaseResponse<ArrayList<CityBean>>> getCitys(@FieldMap Map<String, String> params);


    /**
     * 意见反馈
     */
    @FormUrlEncoded
    @POST("/settingInterfaces/v1.0/insertAdvice")
    Observable<BaseResponse<String>> feedback(@FieldMap Map<String, String> params);

    /**
     * 获取优惠券
     */
    @FormUrlEncoded
    @POST("/kmCouponController/v1.0/findMyCoupons")
    Observable<BaseResponse<String>> getYouhuijuan(@FieldMap Map<String, String> params);


    /**
     * 退出登录
     */
    @FormUrlEncoded
    @POST("/memberInterfaces/v1.0/outLogin")
    Observable<BaseResponse<Object>> logout(@FieldMap Map<String, String> params);

    /**
     * 上传图片
     */
    @POST("/settingInterfaces/v1.0/uploadImgs")
    Observable<BaseResponse<ArrayList<String>>> uploadImgs(@Body RequestBody body);

}
